<template>
  <div>
    <el-table
    :data="tableData"
    :stripe="true"
    style="width: 100%">
      <el-table-column
        label="编号">
        <template slot-scope="scope">
          <span>{{ scope.row.id }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="文件名">
        <template slot-scope="scope">
          <span >{{ scope.row.file_name }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="操作日期">
        <template slot-scope="scope">
          <span >{{ scope.row.s_optDate}}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="操作时间">
        <template slot-scope="scope">
          <span >{{ scope.row.s_optTime }}</span>
        </template>
      </el-table-column>
      <el-table-column
        :filters="[{ text: '提交文件', value: 1 }, { text: '撤销文件', value: 0 }]"
        :filter-method="filterTag"
        filter-placement="bottom-end"
        label="操作类型">
        <template slot-scope="scope">
          <el-tag
          :type="scope.row.status === 1 ? 'primary' : 'danger'"
          disable-transitions>{{scope.row.status===1?'提交文件':'撤销文件'}}</el-tag>
        </template>
      </el-table-column>
    </el-table>
  </div>

</template>

<script>
import { showSLogInfor } from '@/api/user'
export default{
  data() {
    return{
      tableData:[]
    }
  },
  created: function() {
    showSLogInfor(this.$store.getters.token).then(response => {
      this.tableData = response.data.SLogInfor
    })
  },
  methods:{
    filterTag(value, row) {
      return row.status === value;
    }
  }
  

}


</script>

<style lang="scss" scoped>

</style>
  